$('#add').click(function () {
    $.ajax({
        url: "/citrusmonitor/illness.do?method=add",
        type: "post",
        contentType: "application/x-www-form-urlencoded;charset=utf-8",
        data: {
            "temperature": $("#temperature").val(),
            "adultPestNum": $("#adult_pest_num").val(),
            "larvaNum": $("#larva_num").val(),
            "eggNum": $("#egg_num").val(),
            "detail": $("#detail").val(),
            "phoneNum": $("#phone_num").val(),
            "userName": $("#user_name").val()
        },
        
        dataType: "json",
        success: function (msg) {
            if (msg.status==1) {
                alert("添加成功");
            } else {
                alert("添加失败" );
            }
        },
        error:function(){
            alert("资源加载失败！！！");
        }
    })
})